Skip to content

Conversation

@DavidBennettUK
Copy link
Contributor

Q A
Branch? 4.2
Tickets #7460
License MIT
Doc PR N/A

Potential fix for #7460. This fixes the issue for me, but not sure if it's the best way, or if there will be any side effects.

$parameters = $operation->getParameters() ?? new Parameters();
foreach ($parameters as $key => $parameter) {
['propertyNames' => $propertyNames, 'properties' => $properties] = $this->getProperties($resourceClass, $parameter);
['propertyNames' => $propertyNames, 'properties' => $properties] = $this->getProperties($resourceClass, $parameter, $key);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What bother's me is that a parameter should always have akey, would it be possible to change the loop and do:

foreach ($parameters as $key => $parameter) {
    if (!$parameter->getKey()) {
        $parameter = $parameter->withKey($key);
    }

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can confirm that works! Have updated the PR.

@DavidBennettUK DavidBennettUK force-pushed the multiple-query-parameter-property-placeholders-validation-issue branch from 63f9726 to 54bfe18 Compare November 3, 2025 15:54
@DavidBennettUK DavidBennettUK changed the base branch from main to 4.2 November 3, 2025 15:55
@DavidBennettUK DavidBennettUK force-pushed the multiple-query-parameter-property-placeholders-validation-issue branch from 54bfe18 to d1e10c3 Compare November 3, 2025 16:02
@DavidBennettUK DavidBennettUK requested a review from soyuka November 3, 2025 16:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants